This is an example of a fat component built using Symantec C/C++ 8.0.x and Think C 7.0.x.
What It Does
The component and the interface glue provide an implementation of the Un*x syslog routines. The man page for the syslog routines is included to see how to use them.
There are two extra routines provided that are not part of the normal syslog implementation. syslogerr() returns the last error encountered in the component. setsyslogfile() changes the default file written into by the syslog routines (the default file is named syslog and is stored in the system folder). Also a utility routine HaveComponentMgr() will determine if the component manager is available.
Building The Component
First build the 68k resource file using Think C 7.0.x. Name the file that is built 68k Syslog Code.rsrc.
Then open the PPC project file Syslog.π and bring it up to date. This will build the fat code resource and add all of the other resources to the project's resource file.
Make a copy of the Syslog.π.rsrc file and name it Syslog Component (at this point you may want to open the resource file and remove the 'TEMP' resource created during the build process).
Drag the Syslog Component file on top of the 68k Make thng application. This changes the type and creator of the resource file to the 'thng' type and the 'BNDL' resource's creator.
Drop the Syslog Component on the System Folder; it will be placed in the Extensions Folder.
Nuggets Of Truth
There are a few things that I learned when creating this component, and I want to share them with you.
• The Tech Note QT 05 - Component Manager version 3.0 is incorrect. The tech note describes how to build a component that can support 68k and/or PPC platforms without building fat code resources. By using an extended 'thng' resource, you specify the target platform (68k or PPC) and the associated code resource for that platform. By actually building a component following the spec I found that this is not true. Using version 4 of the Component